<?php
defined('_XR_EXEC') or die();
/**
 * 逻辑处理类 
 */
class sendpi_Model extends Model
{ 
	public function updateit($id){
		$db = factory::getdbo();
		$rs_sendpi = $db->loadassoc('select * from t_sendpi where id="'.$id.'" and deleted=0 ');
		if(!$rs_sendpi){
			return false;
		}
		return $db->update('sendpi',array(
			'id'=>$id,
			'sendfennum'=>$db->loadresult('select count(*) from t_sendfen where sendpi_id="'.$id.'" '), 
			'updated'=>'now()',
			'updated_user_id'=>factory::module('admin')->getuserid()
		));
	}
	
	 
	
	
	
}

?>